﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverApp.ViewModel
{
    public class ComputerItemViewModel : ViewModelBase
    {
        private LiveService.Folder      model;
        private ComputerViewModel       parent;

        public ComputerItemViewModel(LiveService.Folder xmodel, ComputerViewModel xparent)
        {
            model = xmodel;
            parent = xparent;
        }

        public ComputerItemViewModel(ComputerItemViewModel xcopy)
        {
            model = xcopy.model;
            parent = xcopy.parent;
        }

        public LiveService.Folder Model
        {
            get { return this.model;}
            set { this.model = value;}
        }

        public String ModelName
        {
            get { return this.Model.name; }
            set { this.model.name = value; }
        }

        public ICommand EnterCommand
        {
            get { return this.parent.DoubleCommand; }
            set { this.parent.DoubleCommand = value; }
        }

        public ComputerItemViewModel Selected
        {
            get { return new ComputerItemViewModel(this); }
        }
    }
}
